home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1999 Spring / macformat-077.iso / Shareware Plus / Development / Akua Sweets 131 / Akua Sweets Examples / Imaging / Big Button < prev    next >
Encoding:
Text File  |  1999-03-04  |  1.5 KB  |  64 lines  |  [TEXT/ToyS]

  1. global gasDrawWin
  2.  
  3.  
  4. on run
  5.     set gasDrawWin to ¬
  6.         display drawing titled ¬
  7.             "Big Button 1.0" with dimensions {160, 72}
  8.     
  9.     -- Fill background
  10.     draw a box into gasDrawWin ¬
  11.         inside of {0, 0, 160, 72} ¬
  12.         using state {fg color:"EEEEEE"} ¬
  13.         with filling it
  14.     
  15.     -- Outer frame
  16.     draw a rounded box into gasDrawWin ¬
  17.         inside of {16, 16, 144, 56} ¬
  18.         using state {pen size:{2, 2}, fg color:"000000"} ¬
  19.         with scale {16, 16} -- Round it
  20.     
  21.     -- Inner fill frame
  22.     draw a rounded box into gasDrawWin ¬
  23.         inside of {18, 18, 142, 54} ¬
  24.         using state {fg color:"DDDDDD"} ¬
  25.         with scale {12, 12} with filling it -- Round it
  26.     
  27.     -- Lower darker frame
  28.     draw a rounded box into gasDrawWin ¬
  29.         inside of {18, 18, 142, 54} ¬
  30.         with clip {21, 21, 142, 54} ¬
  31.         using state {fg color:"777777"} ¬
  32.         with scale {12, 12} -- Round it
  33.     
  34.     -- Lower lighter frame
  35.     draw a rounded box into gasDrawWin ¬
  36.         inside of {20, 20, 140, 52} ¬
  37.         with clip {23, 23, 140, 52} ¬
  38.         using state {fg color:"AAAAAA"} ¬
  39.         with scale {10, 10} -- Round it
  40.     
  41.     -- Upper light frame
  42.     draw a rounded box into gasDrawWin ¬
  43.         inside of {20, 20, 140, 52} ¬
  44.         with clip {20, 20, 137, 49} ¬
  45.         using state {fg color:"FFFFFF"} ¬
  46.         with scale {10, 10} -- Round it
  47.     
  48.     -- The text
  49.     draw a text box into gasDrawWin ¬
  50.         inside of {18, 20, 142, 54} ¬
  51.         using state {font name:"Chicago", text size:24, fg color:"000000"} ¬
  52.         justified flush dead center ¬
  53.         using data "Cancel"
  54.     
  55.     -- Refresh
  56.     draw into gasDrawWin ¬
  57.         with refresh
  58. end run
  59.  
  60. on quit
  61.     display drawing gasDrawWin with disposal
  62.     return (continue quit)
  63. end quit
  64.